import { Component, OnInit } from '@angular/core';
import { HttpService } from '../../.././services/http.service';
import { Router } from '@angular/router'

@Component({
  selector: 'app-receivesite',
  templateUrl: './receivesite.page.html',
  styleUrls: ['./receivesite.page.scss'],
})
export class ReceivesitePage implements OnInit {
  public receiveList:any
  constructor(
    public HttpService: HttpService,
    public router: Router,
  ) { }

  ngOnInit() {
    this.seach()
  }
  seach(){
    let p ={
      currentPage:"1",
      pageSize: "999",
    }
    this.HttpService.getreceive(p).then(res =>{
      // console.log(res)
      this.receiveList = res['items']
    })
  }
  //去增加收货地址
  toaddrece(){
    this.router.navigate(['/mycenter/addreceivesite'],{queryParams:{}})
  }
  //去编辑收货地址
  tocompile(){
    this.router.navigate(['/mycenter/addreceivesite'],{queryParams:{}})
  }
}
